package i_thread;

// TheadEx
// Thead class를 사용하여 쓰레드 구현
// make : pwg
// date : 2003
// note : inner class를 사용하여 쓰레드 구현
// ===============================================

public class  ThreadEx3 
{
	myThead myT;

	public ThreadEx3()
	{
		myT = new myThead();
		myT.start();

	}

	public static void main(String arg[])
	{
		ThreadEx3 f=new ThreadEx3();

	}

	// inner class
	class myThead extends Thread
	{
		public void run()
		{
			int cnt=0;
			while(cnt<10) 
			{
				try
				{
					Thread.sleep(1000);
						
				}
				catch (Exception e)
				{
				}
				System.out.println(cnt);
				cnt++;

			}
		}
	};

}